import type { App } from 'vue'
import { createRouter, createWebHistory } from 'vue-router'

export const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: '/',
            name: 'Index',
            component: () => import('@/pages/index.vue')
        },
        {
            path: '/about',
            name: 'About',
            component: () => import('@/pages/about.vue')
        }
    ],
    strict: true,
    scrollBehavior: () => ({ left: 0, top: 0 })
})

export function setupRouter(app: App) {
    app.use(router)
}
